
# Change path to your folder

setwd('f:\\UDMTD02\\UnitEcon\\example')

library("polynom") # Load package polynom
#library("GVEC")	 # Load package GVEC

series.data<-scan(file = "inc_exp_uk.txt",sep="\t",what=list(0,0,0,0))

xmat<-cbind(as.vector(series.data[[3]]),as.vector(series.data[[4]]))

x0<-ts(data=xmat,frequency=4,start=c(1,1))

n<-nrow(x0)

model0<-autoGVEC(x0,var.order='BIC',vec.order='BIC',logtrans=F,d='BIC',eps1=n^(-1/3),eps2=n^(-1/3),method=1)
model1<-autoGVEC(x0,var.order='BIC',vec.order='BIC',logtrans=F,d='BIC',eps1=log(log(n))/sqrt(n),eps2=log(log(n))/sqrt(n),method=1)


pred<-GVECpred(x0,4,model0,64)

